/*********************************************************************
	\file :           os_sw_layers\bios\gpt\Gpt_Cfg.h
	\brief:           Contains configuration settings and structures for GPT driver.
	\author:          Omar Ramirez
	\version:         1.0
	\date:            Wed, 12, Feb 2014 
*********************************************************************/

#ifndef Gpt_Cfg_H
#define Gpt_Cfg_H

 
#include "p1TestCases.h"
#include "typedef_OS.h"
 

/********************************************************************************
* Package description: Contains configuration settings and structures for GPT driver.                                   
*/
 
/********************************************************************************
* Type definition: Numeric ID of a GPT Channel.             
*/
 
typedef u8 Gpt_ChannelType;

/********************************************************************************
* Type definition: Used for reading the current timer value/setting periodic timer values (In number of ticks).             
*/
 
typedef u8 Gpt_ValueType;

/********************************************************************************
* Type definition: PIT Device configuration.             
*/
 
typedef struct PIT_ChannelConfigType
{
    /*!< Time in microseconds. */
    u32 TimeInMicroseconds;		 
    /*!< Microtimer source */
    u8 TimerSource;		 
    /*!< Callback function. */
    tCallbackFn CallbackFunction;		 
} PIT_ChannelConfigType;

/********************************************************************************
* Type definition: PIT Device configuration structure.             
*/
 
typedef struct PIT_DeviceConfigType
{
    /*!< Number of PIT Channels. */
    u8 u8NumberOfPITChannels;		 
    /*!< Micro timer source configuration 1. */
    u8 u8MicroTimer0;		 
    /*!< Micro timer source configuration 2. */
    u8 u8MicroTimer1;		 
    /*!< Pointer to PIT Channel Configuration. */
    PIT_ChannelConfigType *psChannelConfig;		 
} PIT_DeviceConfigType;

/********************************************************************************
* Type definition: GPT device configuration.             
*/
 
typedef struct Gpt_DeviceConfigType
{
    /*!< Pointer to PIT device configuration structure. */
    PIT_DeviceConfigType *psDeviceConfig;		 
} Gpt_DeviceConfigType;

/********************************************************************************
* Type definition: GPT driver configuration type.             
*/
 
typedef struct Gpt_ConfigType
{
    /*!< No of Gpt devices. */
    u8 u8NumberOfGptDevices;		 
    /*!< Pointer to device structure. */
    Gpt_DeviceConfigType *psGptDeviceConfig;		 
} Gpt_ConfigType;

/*!<  */
 
extern Gpt_ConfigType Mal_Gpt_Config[];

/*!<  */
 
extern Gpt_DeviceConfigType Mal_Gpt_DeviceConfig[];

/*!<  */
 
extern PIT_ChannelConfigType Mal_Pit_ChannelConfig[];

/*!<  */
 
extern PIT_DeviceConfigType Mal_Pit_DeviceConfig[];

#endif
/*********************************************************************
	File	: os_sw_layers\bios\gpt\Gpt_Cfg.h 
*********************************************************************/
